package cn.tedu.test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class Driver {
    @Autowired
    @Qualifier("truck")
    private Car car;
     public void work(){
         car.drive();
         System.out.println("去讨债");
     }
}
